package com.weiyin.examination.module;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author lenovo
 * @date 2017/9/20
 */

public class AnswerModule implements Parcelable {
    /**
     * 每小题答对分数
     */
    private String score;
    /**
     * 行号
     */
    private String lineNumber;
    /**
     * 左列答案id
     */
    private String leftId;
    /**
     * 右列答案id
     */
    private String rightId;
    /**
     * 答案id
     */
    private String id;
    /**
     * 中间一列id
     */
    private String centerId;

    /**
     * 每个正确答案内容音符所有信息( 多个用逗号隔开 )
     */
    private List<String> answerContentList;

    /**
     * 小节号
     */
    private String sectionNumber;
    /**
     * 是否显示调号
     */
    private String mark;
    /**
     * 小节线矩形坐标
     */
    private RestrictModule restrictList;

    private List<AnswerXml> answerXmlList;


    protected AnswerModule(Parcel in) {
        score = in.readString();
        lineNumber = in.readString();
        leftId = in.readString();
        rightId = in.readString();
        id = in.readString();
        centerId = in.readString();
        answerContentList = in.createStringArrayList();
        sectionNumber = in.readString();
        mark = in.readString();
        restrictList = in.readParcelable(RestrictModule.class.getClassLoader());
        answerXmlList = in.createTypedArrayList(AnswerXml.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(score);
        dest.writeString(lineNumber);
        dest.writeString(leftId);
        dest.writeString(rightId);
        dest.writeString(id);
        dest.writeString(centerId);
        dest.writeStringList(answerContentList);
        dest.writeString(sectionNumber);
        dest.writeString(mark);
        dest.writeParcelable(restrictList, flags);
        dest.writeTypedList(answerXmlList);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<AnswerModule> CREATOR = new Creator<AnswerModule>() {
        @Override
        public AnswerModule createFromParcel(Parcel in) {
            return new AnswerModule(in);
        }

        @Override
        public AnswerModule[] newArray(int size) {
            return new AnswerModule[size];
        }
    };

    public List<AnswerXml> getAnswerXmlList() {
        return answerXmlList;
    }

    public void setAnswerXmlList(List<AnswerXml> answerXmlList) {
        this.answerXmlList = answerXmlList;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getLineNumber() {
        return lineNumber;
    }

    public void setLineNumber(String lineNumber) {
        this.lineNumber = lineNumber;
    }

    public String getLeftId() {
        return leftId;
    }

    public void setLeftId(String leftId) {
        this.leftId = leftId;
    }

    public String getRightId() {
        return rightId;
    }

    public void setRightId(String rightId) {
        this.rightId = rightId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCenterId() {
        return centerId;
    }

    public void setCenterId(String centerId) {
        this.centerId = centerId;
    }

    public List<String> getAnswerContentList() {
        return answerContentList;
    }

    public void setAnswerContentList(List<String> answerContentList) {
        this.answerContentList = answerContentList;
    }

    public String getSectionNumber() {
        return sectionNumber;
    }

    public void setSectionNumber(String sectionNumber) {
        this.sectionNumber = sectionNumber;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public RestrictModule getRestrictList() {
        return restrictList;
    }

    public void setRestrictList(RestrictModule restrictList) {
        this.restrictList = restrictList;
    }

}
